package com.cykj.controller;

import com.cykj.dto.ResponseDto;
import com.cykj.pojo.PsBill;
import com.cykj.service.BillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @BelongsProject: Psychology
 * @BelongsPackage: com.cykj.controller
 * @Author: 小林
 * @CreateTime: 2025-02-15 16:47
 * @Description: 账单表
 * @Version: 1.0
 */
@RestController
@RequestMapping("/bbill")
public class BillController {
    @Autowired
    private BillService billService;

    /**
     * 插入账单表记录
     * @param psBill
     * @return
     */
    @RequestMapping("/addRecord")
    public ResponseDto addRecord(@RequestBody PsBill psBill){
       return billService.addRecord(psBill);
    }
    //获取全部账单
    @RequestMapping("/getAll")
    public ResponseDto getAll(@RequestBody PsBill psBill){
        return billService.getAll(psBill);
    }
}

